//
//  DHCityListCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/1/19.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "DHCityListCell.h"

@implementation DHCityListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.font = [UIFont systemFontOfSize:18];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.backgroundColor = [UIColor clearColor];
        self.titleLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:self.titleLabel];
        
//        self.selectImgView = [[UIImageView alloc] init];
//        [self.selectImgView setContentMode:UIViewContentModeCenter];
//        self.selectImgView.image = [UIImage imageNamed:@"home_city_selected"];
//        [self.contentView addSubview:self.selectImgView];
//        self.selectImgView.hidden = YES;
        
        self.contentView.backgroundColor = [UIColor clearColor];
        self.backgroundColor = [UIColor clearColor];
        
        self.lineView = [[UIView alloc] init];
        self.lineView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.lineView];
        
        self.topLineView = [[UIView alloc] init];
        self.topLineView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.topLineView];
        
        self.topLineView.hidden = YES;
    }
    return self;
}

- (void)layoutSubviews{
    self.titleLabel.frame = CGRectMake(0, 0, self.width, self.height);
//    self.selectImgView.frame = CGRectMake(self.width - self.height, 0, 0, self.height);
    self.lineView.frame = CGRectMake(0, self.height - 1, self.width, 1);
    self.topLineView.frame = CGRectMake(0, 0, self.width, 1);
}

@end
